package com.steakliu.spi.serializer;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.steakliu.spi.shenyu.Join;

import java.lang.reflect.Type;

/**
 * 功能说明：
 * <p>
 * Original @Author: steakliu-刘牌, 2022-06-29  09:09
 * <p>
 * Copyright (C)2020-2022  小四的技术之旅 All rights reserved.
 */
@Join
public class GsonSerializer implements Serializer{
    @Override
    public byte[] serialize(Object object) {
        return new byte[0];
    }

    @Override
    public <T> T deserialize(byte[] bytes, Class<T> clazz) {
        return JSONObject.parseObject(new String(bytes), clazz);
    }
}
